<template>
	<view class="page px22 py16">
		<!-- <view class="" v-html="detailContent">
			
		</view> -->
		<!-- <rich-text :nodes="detailContent"></rich-text> -->
		<mp-html v-if="detailContent" :content="detailContent"></mp-html>
		<!-- <view v-html="detailContent"></view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				newId: '',
				detailData: '',
				detailContent: ''
			}
		},
		onLoad(options) {
			this.newId = options.id || ''
			this.getNewDetail()
		},
		methods: {
			getNewDetail() {
				this.$http({
					url: '/Data/newDetail',
					data: {
						id: this.newId
					}
				}).then(res => {
					this.detailData = res.data
					this.detailContent = this.$replace_Rich_text(res.data.content)
				})
			}
		},
		onShareAppMessage() {
			return {
				title: this.detailData.title,
				imageUrl: this.detailData.img,
				path: "/pages/newDetail/newDetail?id=" + this.detailData.id
			}
		},
		onShareTimeline() {
			return {
				title: this.detailData.title,
				imageUrl: this.detailData.img,
				path: "/pages/newDetail/newDetail?id=" + this.detailData.id
			}
		}
	}
</script>

<style>

</style>